<template>
  <div class="bg-red-300">
    <el-button @click="toContent">ToContent</el-button>
    <el-button @click="add">{{ count }}</el-button>
  </div>
</template>

<script>
  import { useRouter } from '@/hooks/router'
  import { useStore } from '@/stores/modules/app'
  export default defineComponent({
    name: 'HomePage',
    setup() {
      const store = useStore()
      const router = useRouter()
      function toContent() {
        router.push('/content')
      }
      const count = computed(() => store.count)
      function add() {
        store.add()
      }
      return {
        toContent,
        count,
        add
      }
    }
  })
</script>

<style lang="scss" scoped></style>
